package com.itbaizhan.shopping_goods_service.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itbaizhan.shopping_common.pojo.Goods;
import com.itbaizhan.shopping_common.pojo.GoodsDesc;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author spf
 * @date 2023/12/26
 * @time 14:28
 */

// 商品服务持久层
@Mapper
public interface GoodsMapper extends BaseMapper<Goods> {
    // 添加商品_规格项数据
    void addGoodsSpecificationOption(@Param("gid") Long gid, @Param("optionId") Long optionId);

    void deleteGoodsSpecificationOption(@Param("gid") Long gid);

    void putAway(@Param("id") Long id, @Param("isMarketable") Boolean isMarketable);

    Goods findById(Long id);
    List<GoodsDesc> findAll();

    GoodsDesc findDesc(Long id);
}
